


const loaderUtils = require("loader-utils");


console.log('first-loader');


module.exports=function(content,map,meta){

    const options = loaderUtils.getOptions(this);

    // this.context F:\测试项目\webpack-learn-demo\src
    console.log('this.context',this.context);
    // this.resource F:\测试项目\webpack-learn-demo\src\index.js
    console.log('this.resource',this.resource);
    // this.resourcePath F:\测试项目\webpack-learn-demo\src\index.js
    console.log('this.resourcePath',this.resourcePath);

    return 2
    
}

module.exports.pitch = function(remainingRequest, precedingRequest, data) {

    // console.log('第一个loader执行了 pitch------->',this.data);
    
    data.value = 88;
    
    // 当 pitch 中返回了结果，那么执行顺序会回过头来，跳掉剩余的 loader
    // this.callback('',"pitch返回了内容")
}


